﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DamageCalculator.SubForms
{
    public partial class EncounterNamer : Form
    {
        public EncounterNamer()
        {
            InitializeComponent();
        }

        public String NameEntered
        {
            get { return this.textBox1.Text; }
        }

        private void Btn_OK_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
            this.Close();
        }

        private void Btn_Cancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
            this.Close();
        }

        private void EncounterNamer_KeyDown(object sender, KeyEventArgs e)
        {
            if (e.KeyCode == Keys.Enter)
            {
                e.Handled = true;

                this.Btn_OK_Click(null, null);
            }
        }
    }
}
